using System;
using System.Collections.Generic;
using System.Text;
using CMS.Core.DataInterfaces;
using CMS.Core.Domain;
using CMS.Presenters.Views.Template;
using CMS.Data;

namespace CMS.Presenters.Presenters.Template
{
    public class BaiVietDetailPresenter
    {
        private IBaiVietDetailView view;
        private IBaiVietDao objDao;

        public BaiVietDetailPresenter(IBaiVietDetailView view, IBaiVietDao objDao)
        {
            this.view = view;
            this.objDao = objDao;
        }

        public void GetAllBaiVietOtherBaiViet(int MaTheLoai, int MaBaiViet)
        {
            this.view.LstBaiViet = this.objDao.GetAllBaiVietOtherBaiViet(MaTheLoai, MaBaiViet);
        }

        public void GetBaiVietSelected(int MaBaiViet)
        {
            this.view.BaiVietSelected = new BaiVietDao().GetById(MaBaiViet);
        }
    }
}
